package com.yuba.front.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yuba.common.excel.annotation.ExcelDictFormat;
import com.yuba.common.excel.convert.ExcelDictConvert;
import com.yuba.common.translation.annotation.Translation;
import com.yuba.common.translation.constant.TransConstant;
import com.yuba.front.domain.Articles;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;



/**
 * 钓鱼知识库视图对象 articles
 *
 * @author modakai
 * @date 2024-12-13
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = Articles.class)
public class ArticlesVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 文章ID
     */
    @ExcelProperty(value = "文章ID")
    private Long articleId;

    /**
     * 文章标题
     */
    @ExcelProperty(value = "文章标题")
    private String title;

    /**
     * 文章所属分类的类型（4位字符，如BS01表示基础常识）
     */
    @ExcelProperty(value = "文章所属分类的类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "articles_category_code")
    private String categoryCode;

    @Translation(type = TransConstant.DICT_TYPE_TO_LABEL, mapper = "categoryCode", other = "articles_category_code")
    private String categoryCodeName;

    /**
     * 是否同步知识库
     */
    private String vectorSyncFlag;

    /**
     * 文章内容
     */
    @ExcelProperty(value = "文章内容")
    private String content;

    /**
     * 浏览量
     */
    @ExcelProperty(value = "浏览量")
    private Long views;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String description;


}
